<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexEpisodeIdInEntityEpisodeRelationTable extends AbstractMigration
{
    public function up()
    {
        $this->table('entity_episode_relation')->addIndex(['episode_id', 'showings_number'], ['type' => 'normal', 'name' => 'idx_episode_showings_number'])->save();
    }

    public function down()
    {
        $this->table('entity_episode_relation')->removeIndexByName('idx_episode_id_showingsNumber')->save();
    }
}
